package ui.uea;

import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;
import javax.swing.JOptionPane;

@SuppressWarnings("serial")
public class FailMessage extends JOptionPane {
	private UEAPicturePath path = new UEAPicturePath();
//	private JLabel message;
	
//	public static void show(String text){
//		
//	}
	@Override 
	protected void paintComponent(Graphics g){
		super.paintComponent(g);
		BufferedImage im = null;
		try {
			 im = ImageIO.read(new File(path.getFailureMessage()));
		} catch (IOException e) {
			e.printStackTrace();
		}
		g.drawImage(im, 0, 0,this.getWidth(),this.getHeight(), null);
	}
}
